<template>
  <div class="goodsdesc-container">
    <h1>{{ info[0].title }}</h1>
    <hr />
    <div class="content" v-html="info[0].content"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      info: {},
      id: this.$route.params.id
    };
  },
  created() {
    this.getGoodDesc();
  },
  methods: {
    getGoodDesc() {
      this.$http.get("api/goods/getdesc/" + this.id).then(result => {
        if (result.body.status === 0) {
          this.info = result.body.message;
          console.log(this.info);
        }
      });
    }
  }
};
</script>


<style lang="scss">
.goodsdesc-container {
  padding: 4px;
  h1 {
    font-size: 16px;
    color: rgb(46, 133, 214);
    text-align: center;
  }
  .content {
    img {
      width: 100%;
    }
  }
}
</style>